import { useAppContext } from "@/components/AppContext"
import { Button } from 'antd';
import { ActionType } from "@/reducers/AppReducer"
import {EyeInvisibleOutlined} from "@ant-design/icons";

export default function Menubar() {
  const { dispatch } = useAppContext()
  return (
    <div className='flex space-x-3'>
      <Button className={'flex-1'}  type={"primary"}>
        新建对话
      </Button>
      <Button className={''} icon={<EyeInvisibleOutlined />}
        onClick={() => {
          dispatch({
            type: ActionType.UPDATE,
            field: "displayNavigation",
            value: false
          })
        }}
      />
    </div>
  )
}
